

#ifndef __INET_RoceMsgSerializer_H
#define __INET_RoceMsgSerializer_H

#include "inet/transportlayer/udp/UdpHeaderSerializer.h"
#include "inet/applications/udpapp/UdpBasicApp.h"
#include "RoceMsg_m.h"
#include "basic.h"

namespace inet {

/**
 * Converts between UdpHeader and binary (network byte order) Udp header.
 */
class INET_API RoceMsgSerializer : public inet::FieldsChunkSerializer
{
  protected:
    virtual void serialize(inet::MemoryOutputStream& stream, const inet::Ptr<const inet::Chunk>& chunk) const override;
    virtual const inet::Ptr<inet::Chunk> deserialize(inet::MemoryInputStream& stream) const override;

  public:
    RoceMsgSerializer() : inet::FieldsChunkSerializer() {}
};

} // namespace inet

#endif // ifndef __INET_RoceMsgSerializer_H

